<template>
    <div class="infoshow">
        <el-row type="flex" class="row-bg" justify="center">
            <el-col :span="4">
                <div class="user">
                    <img :src="user.avatar" class="avatar" alt="">
                </div>
            </el-col>
            <el-col :span="6">
                <div class="userinfo">
                  <el-card class="box-card">
                    <div slot="header" class="clearfix">
                      <span>个人信息</span>
                    </div>
                    <div class="text item">
                      姓名：{{ user.name }}
                    </div>
                    <div class="text item">
                      生命值：{{ user.hp }}/{{ user.max_hp }}
                    </div>
                    <div class="text item">
                      灵气值：{{ user.user_exp }}
                    </div>
                    <div class="text item">
                      战斗力：{{ user.strength + user.defense + user.magic + user.speed }}
                    </div>
                </el-card>
                <el-card class="box-card">
                  <div slot="header" class="clearfix">
                      <i class="fa fa-legal"></i>
                      <span>装备</span>
                  </div>
                        <div class="text item">武器：武器名字ABC</div>
                        <div class="text item">衣服：衣服名字ABC</div>
                        <div class="text item">鞋子：鞋子名字ABC</div>
                        <div class="text item">项链：项链名字ABC</div>
                        <div class="text item">戒指：戒指名字ABC</div>
                </el-card>             
                </div>
            </el-col>
            <el-col :span="14">
                    <div class="user-lastest-event">
                        <el-card class="box-card">
                          <div slot="header" class="clearfix">
                            <i class="fa fa-calendar"></i>
                            <span>最近事件</span>
                          </div>
                          <div class="text item">事件1</div>
                          <div class="text item">事件2</div>
                          <div class="text item">事件33333333333333333333333333333333333333333333333333333333333333333333333333333777</div>
                        </el-card>
                    </div>
            </el-col>
        </el-row>
    </div>
</template>
<script>
export default {
    name: 'infoshow',
    data(){
      return {
            tableData: [],
            alltableData: [],
      }
    },
    computed:{
        user(){
            return this.$store.getters.user
        }
    }
};
</script>
<style scoped>
.infoshow {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  /* padding: 16px; */
}
.row-bg {
  width: 100%;
  height: 100%;
}
.user {
  text-align: center;
  position: relative;
  top: 30%;
}
.user img {
  width: 150px;
  border-radius: 50%;
}
.user span{
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  font-weight: bold;
}
.userinfo {
  height: 100%;
  background-color: #eee;
  border-right: #333;
  padding-left: 5%;

}
.user-item {
  position: relative;
  top: 5%;
  padding: 26px;
  font-size: 18px;
  color: #333;
}
.user-item div{
  padding-top: 4px;
}
.user-equip {
  position: relative;
  top: 5%;
  padding: 2px;
  font-size: 18px;
  color: #333;
}
.user-equip div{
  padding-top: 4px;
}
.user-lastest-event {
  height: 100%;
  background-color: #eee;
  border-right: #333;
}
.text {
    font-size: 14px;
}

.item {
    margin-bottom: 18px;
}

.clearfix:before,
.clearfix:after {
    display: table;
    content: "";
}
.clearfix:after {
    clear: both
}

.box-card {
    width: 97%;
}
</style>

